package com.zhihao.infrastructure.dao;

import com.zhihao.infrastructure.dao.po.UserCreditAccount;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author Jackson
 * @description 用户积分账户
 * @create 2024-05-24 21:11
 */
@Mapper
public interface IUserCreditAccountDao {

    void insert(UserCreditAccount userCreditAccountReq);

    /* 积分调额---用于积分增加操作：需要增加总量和剩余量 */
    int updateAddAmount(UserCreditAccount userCreditAccountReq);
    /* 积分调额---用于积分扣减操作：仅需要扣减剩余量 */
    int updateSubtractionAmount(UserCreditAccount userCreditAccountReq);

    UserCreditAccount queryUserCreditAccount(UserCreditAccount userCreditAccountReq);

}
